package com.softlook.mt.server.db.internal;

import java.lang.String;
import java.util.Hashtable;
import java.lang.Integer;
import jp.crossfire.framework.database.ICondition;
import jp.crossfire.framework.database.ConditionContainer;
import jp.crossfire.framework.database.Condition;

public class DeviceEventManagerInternal {
	public String getSql(Hashtable input, Integer limit, Integer offset) {
		return null;
	}
	protected ICondition getGetCondition(Hashtable input) {
		// Condition
		ICondition cnd0= new ConditionContainer("AND");
		ICondition cnd1= new Condition("deviceeventid = '$deviceeventid'");
		if(input.get("deviceeventid") != null){
			((Condition)cnd1).getProperties().put("deviceeventid", input.get("deviceeventid"));
		}
		((ConditionContainer)cnd0).addChild(cnd1);
		ICondition cnd2= new Condition("deviceid = '$deviceid'");
		if(input.get("deviceid") != null){
			((Condition)cnd2).getProperties().put("deviceid", input.get("deviceid"));
		}
		((ConditionContainer)cnd0).addChild(cnd2);
		ICondition cnd3= new Condition("eventid = '$eventid'");
		if(input.get("eventid") != null){
			((Condition)cnd3).getProperties().put("eventid", input.get("eventid"));
		}
		((ConditionContainer)cnd0).addChild(cnd3);
		ICondition cnd4= new Condition("placeid = '$placeid'");
		if(input.get("placeid") != null){
			((Condition)cnd4).getProperties().put("placeid", input.get("placeid"));
		}
		((ConditionContainer)cnd0).addChild(cnd4);
		ICondition cnd5= new Condition("time >= '$timefrom'");
		if(input.get("timefrom") != null){
			((Condition)cnd5).getProperties().put("timefrom", input.get("timefrom"));
		}
		((ConditionContainer)cnd0).addChild(cnd5);
		ICondition cnd6= new Condition("time <= '$timeto'");
		if(input.get("timeto") != null){
			((Condition)cnd6).getProperties().put("timeto", input.get("timeto"));
		}
		((ConditionContainer)cnd0).addChild(cnd6);
		return cnd0;
	}
	protected ICondition getGetHavingCondition(Hashtable input) {
		// Condition
		return null;
	}
	public String getLastSql(Hashtable input, Integer limit, Integer offset) {
		return null;
	}
	protected ICondition getLastGetCondition(Hashtable input) {
		// Condition
		ICondition cnd0= new ConditionContainer("AND");
		ICondition cnd1= new Condition("deviceeventid = (@getMaxDeviceEventId)");
		((Condition)cnd1).getProperties().put("@getMaxDeviceEventId", getMaxDeviceEventIdSql(input, null, null));
		((ConditionContainer)cnd0).addChild(cnd1);
		return cnd0;
	}
	protected ICondition getLastGetHavingCondition(Hashtable input) {
		// Condition
		return null;
	}
	public String getMaxDeviceEventIdSql(Hashtable input, Integer limit, Integer offset) {
		return null;
	}
	protected ICondition getMaxDeviceEventIdGetCondition(Hashtable input) {
		// Condition
		ICondition cnd0= new ConditionContainer("AND");
		ICondition cnd1= new Condition("deviceid = '$deviceid'");
		if(input.get("deviceid") != null){
			((Condition)cnd1).getProperties().put("deviceid", input.get("deviceid"));
		}
		((ConditionContainer)cnd0).addChild(cnd1);
		ICondition cnd2= new Condition("eventid = '$eventid'");
		if(input.get("eventid") != null){
			((Condition)cnd2).getProperties().put("eventid", input.get("eventid"));
		}
		((ConditionContainer)cnd0).addChild(cnd2);
		ICondition cnd3= new Condition("placeid = '$placeid'");
		if(input.get("placeid") != null){
			((Condition)cnd3).getProperties().put("placeid", input.get("placeid"));
		}
		((ConditionContainer)cnd0).addChild(cnd3);
		return cnd0;
	}
	protected ICondition getMaxDeviceEventIdGetHavingCondition(Hashtable input) {
		// Condition
		return null;
	}
}
